htons

htons converts a u_short IPv4 address in host byte-ordering to TCP/IP network byte order.

Syntax

U_short WSAAPI htons(
    __in u_short hostshort
);

Parameters

hostshort

A 16 bit number in host byte order

Return Values

The value supplied in the hostshort parameter in TCP/IP network byte order.

IntervalZero.com | Support | Give Feedback